<?php

/*
 * Librería que se encarga de construir los mensajes que se envían por servidor de correo
 *
 * Autores: 
 *                - Fuck.inc
 */
 
class Messageemail
{
	public $nameApp;
	public $domainApp;
	
	function __construct($nameApp, $domainApp)
	{
		$this->nameApp = $nameApp;
		$this->domainApp = $domainApp;
	}
	
	public function verify_email($fullname, $user, $codeConfirmation)
	{
		$message =  "
				<html>
				<head>
					<title>" . $this->nameApp . "</title>
				</head>
				<body style='background-color: #ffffff;'>
				<div style='padding: 40px; margin: auto; width: 600px; background-color: rgb(245, 246, 241);'>
					<div style='font-family: tahoma, verdana, arial, sans-serif; font-size: 13px;'>
						<div style='background-color: #ffffff; border: 5px solid #cccccc;'>
							<div style='padding: 30px 15px 15px;'>
								<div>
									<div style='width: 560px;'>
										<div>
											<div style='margin-bottom: 15px; '>" . ucfirst(_("hi")) . ", " . $fullname . ":</div>
											<div style='margin-bottom: 30px; text-align: justify;'>" . ucfirst(_("thank you for creating an account on the site")) . " <span style='font-weight: bold;'>" . $this->domainApp . ".</span> " . ucfirst(_("you are almost through with the registration process. Click on the link")) . " <span style='font-weight: bold;'>\"" . ucfirst(_("confirm registration")) . "\"</span> " . _("to activate your account") . ".</div>
										</div>
									</div>
									<div style='width: 560px; clear: both;'>
										<table cellspacing='0' cellpadding='0' style='border-collapse: collapse;' align='center'>
											<tbody>
											<tr>
												<td style='border: 1px solid #333333; background-color: #696969;'>
													<a target='_blank' style='text-decoration: none;' href='http://" . $this->domainApp . "/activate/" . $user . "/" . $codeConfirmation . "'>
													<table cellspacing='0' cellpadding='0' style='border-collapse: collapse;'>
														<tbody>
														<tr>
															<td style='padding: 4px 10px 5px; border-top: 1px solid #c0c0c0; line-height: 30px; color: #ffffff;  font-weight: bold; font-size: 13px;'>
																" . ucfirst(_("confirm registration")) . "
															</td>
														</tr>
														</tbody>
													</table>
													</a>
												</td>
											</tr>
											</tbody>
										</table>
									</div>
								</div>
								<div style='clear: both; padding-top: 30px;'>
									" . ucfirst("the") . " " . $this->nameApp . " " . ucfirst("team") . "
								</div>
								<br />
								<div style='overflow: hidden;'>
									<div style='font-size: 11px; font-weight: bold; width: 380px; float: left;'>
										<p>" . ucfirst(_("if you did not attempt to create an account, you may ignore this e-mail or by clicking on the link below to erase this request")) . ":</p>
										<a href='http://" . $this->domainApp . "/ignore/" . $user . "/" . $codeConfirmation . "' style='text-decoration: none; color: #ba0f0f; font-weight: normal;'>http://" . $this->domainApp . "/ignore</a>
									</div>
									<div style='float: right; padding-top: 27px;'><a href='http://" . $this->domainApp . "' style='color: #ffffff;' ><img src='logo.jpg' style='border: 0px;' /></a></div>
								</div>
							</div>
							
							<div style='color: #000000; padding: 2px 4px; font-size: 11px; line-height: 20px; letter-spacing: -0.03em; text-align: right;'>Copyright &copy; 2010 - CTF Tecnolog&iacute;a</div>
						</div>
					</div>
				</div>
				</body>
				</html>
			";
			
			return $message;
	}
}
?>